Don't ever go unconditionally to the buffer ends; that doesn't work if the
authorMatthias Clasen <mclasen@redhat.com>
Mon, 11 Jul 2005 19:46:43 +0000 (19:46 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 11 Jul 2005 19:46:43 +0000 (19:46 +0000)
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Don't
ever go unconditionally to the buffer ends; that doesn't work
if the initial or final portion of the buffer are invisible.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtktextview.c

index 270f4002b3b4920dbe56133119d70e48d911e0b4..5b6bd8ab4ac350efabab1088eaa8128e80f6b70d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-11  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Don't
+       ever go unconditionally to the buffer ends; that doesn't work
+       if the initial or final portion of the buffer are invisible.
+
 2005-07-11  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_class_init): add binding entry
index 270f4002b3b4920dbe56133119d70e48d911e0b4..5b6bd8ab4ac350efabab1088eaa8128e80f6b70d 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-11  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Don't
+       ever go unconditionally to the buffer ends; that doesn't work
+       if the initial or final portion of the buffer are invisible.
+
 2005-07-11  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_class_init): add binding entry
index 270f4002b3b4920dbe56133119d70e48d911e0b4..5b6bd8ab4ac350efabab1088eaa8128e80f6b70d 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-11  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Don't
+       ever go unconditionally to the buffer ends; that doesn't work
+       if the initial or final portion of the buffer are invisible.
+
 2005-07-11  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtktreeview.c (gtk_tree_view_class_init): add binding entry
index 0b5c7322c54e883807f5819e79c11a5391f24d53..fb2a26f9db8f1fd1b8a62bada9862e5efe537b53 100644 (file)
@@ -1,4 +1,3 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* GTK - The GIMP Toolkit
  * gtktextview.c Copyright (C) 2000 Red Hat, Inc.
  *
@@ -4720,7 +4719,7 @@ gtk_text_view_move_cursor_internal (GtkTextView     *text_view,
       else if (count > 0) 
        {
          if (!gtk_text_iter_forward_visible_word_ends (&newplace, count))
-           gtk_text_iter_forward_to_end (&newplace);
+           gtk_text_iter_forward_to_line_end (&newplace);
        }
       break;
 
@@ -4730,15 +4729,14 @@ gtk_text_view_move_cursor_internal (GtkTextView     *text_view,
         if (gtk_text_view_move_iter_by_lines (text_view, &newplace, count))
           gtk_text_layout_move_iter_to_x (text_view->layout, &newplace, cursor_x_pos);
         else
-          /* we currently do not have a backward_to_start, use offset */
-          gtk_text_iter_set_offset (&newplace, 0);
+          gtk_text_iter_set_line_offset (&newplace, 0);
       }
       if (count > 0)
       {
         if (gtk_text_view_move_iter_by_lines (text_view, &newplace, count))
           gtk_text_layout_move_iter_to_x (text_view->layout, &newplace, cursor_x_pos);
         else
-          gtk_text_iter_forward_to_end (&newplace);
+          gtk_text_iter_forward_to_line_end (&newplace);
       }
       break;
 
@@ -4808,9 +4806,7 @@ gtk_text_view_move_cursor_internal (GtkTextView     *text_view,
                                                                     "insert"));
 
       if (step == GTK_MOVEMENT_DISPLAY_LINES)
-        {
-          gtk_text_view_set_virtual_cursor_pos (text_view, cursor_x_pos, -1);
-        }
+        gtk_text_view_set_virtual_cursor_pos (text_view, cursor_x_pos, -1);
     }
 
   gtk_text_view_pend_cursor_blink (text_view);